<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Article extends Model
{
    //
    protected $table = 'article';

    protected function getDateFormat()
    {
        return 'U';
    }

    protected $guarded = [''];

    public function photoUrl(){
    	return $this->hasOne('App\Models\Image','post_id','id');
    }


    public function articleCategory(){
        return $this->belongsTo('App\Models\ArticleCategory','category_id','id');
    }
}
